<template>
  <el-button type="danger" :disabled="(useUsersStore().user as any).city == '北京'" plain size="small" @click="handlerClick" @mouseenter="handlerMouseEnter">{{ btnText }}</el-button>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { useUsersStore } from '../../stores'

const emit = defineEmits(['click'])

const btnText = ref('未打卡')

const handlerMouseEnter = () => {
  btnText.value = '去补卡'
}

const handlerClick = () => {
  emit('click')
}
</script>
